package com.ruoyi.foodworks.mapper;

import com.ruoyi.foodworks.domain.ReplyLike;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 回复点赞Mapper接口
 * 
 * @author ruoyi
 * @date 2024-01-01
 */
public interface ReplyLikeMapper {
    
    /**
     * 根据回复ID和用户ID查询点赞记录
     */
    ReplyLike selectByReplyIdAndUserId(@Param("replyId") Long replyId, @Param("userId") Long userId);
    
    /**
     * 根据回复ID获取点赞数量
     */
    Integer selectLikeCountByReplyId(@Param("replyId") Long replyId);
    
    /**
     * 根据回复ID列表和用户ID查询点赞记录
     */
    List<ReplyLike> selectByReplyIdsAndUserId(@Param("replyIds") List<Long> replyIds, @Param("userId") Long userId);
    
    /**
     * 新增点赞记录
     */
    int insertReplyLike(ReplyLike replyLike);
    
    /**
     * 删除点赞记录
     */
    int deleteReplyLikeById(Long id);
}
